<?php
//资源注册容器
namespace wlcat\src;
abstract class Register {
    const REQUEST_CLASS = 'wlcat\\src\\Request';
    const SQL_CLASS     = 'wlcat\\src\\Sql';
    const MODEL_CLASS   = 'wlcat\\http\\model\\Model';
    const VIEW_CLASS    = 'wlcat\\http\\view\\View';
    const CONTROL_CLASS = 'wlcat\\http\\controllers\\Controller';
    const SMARTY_CLASS  = 'wlcat\\src\\templet\\Smarty';
    public static $instance;

    public static function get($key)
    {
        return isset(self::$instance[$key]) ? self::$instance[$key] : null;
    }

    public static function set($key, $value)
    {
        self::$instance[$key] = $value;
    }

    public function remove($key)
    {
        if(array_key_exists($key, self::$instance))
        {
            unset(self::$instance[$key]);
        }
    }

}